package com.dongdongshop.controller;

import com.dongdongshop.data.Result;
import com.dongdongshop.service.ItemService;
import com.dongdongshop.vo.ItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("item")
public class ItemController {

    @Autowired
    private ItemService is;

    //增加
    @PostMapping("addItem")
    public Result addItem(@RequestBody ItemVO vo){
        is.addItem(vo);
        return Result.OK();
    }

}
